

LIBNAME=libghttp.a

CC := $(CROSSCOMPILE)gcc
AR := $(CROSSCOMPILE)ar

CFLAGS += -DGHTTP_MAJOR_VERSION=1 -DGHTTP_MINOR_VERSION=0 -DGHTTP_MICRO_VERSION=9 -DPACKAGE=\"libghttp\" -DVERSION=\"1.0.9\" -DSTDC_HEADERS=1 -I. -I. -g -O2
CFLAGS += -I../libwdbase/include 

ifeq ($(HTTPS_SUPPORT),1)
CFLAGS += -I../wolfssl-3.11.0/$(DEVNAME)-$(HOST)/include
CFLAGS += -DHTTPS_SUPPORT
endif

SOURCE=$(wildcard *.c)
OBJS=$(subst .c,.o,$(SOURCE))


all:$(LIBNAME)  

$(LIBNAME): $(OBJS)
	$(AR) rcs $(LIBNAME) $(OBJS)

%.o:%.c
	$(CC) -c $(CFLAGS) $< -o $@ 

clean:
	rm *.o -f;
	rm *.a -f;

.PHONY: clean all 
